//
//  SHotPlayerTableViewCell.m
//  PocketFM
//
//  Created by sun on 15/12/16.
//  Copyright © 2015年 Sun. All rights reserved.
//

#import "SHotPlayerTableViewCell.h"
#import "ListCategoryModel.h"
#import "ListReourceModel.h"
#import <UIButton+WebCache.h>
@interface SHotPlayerTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *cardTitle;

@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIButton *bigPicture;
@property (weak, nonatomic) IBOutlet UILabel *littleTitle;

@property (weak, nonatomic) IBOutlet UILabel *title2;
@property (weak, nonatomic) IBOutlet UIButton *bigPicture2;
@property (weak, nonatomic) IBOutlet UILabel *littleTitle2;

@property (weak, nonatomic) IBOutlet UILabel *title3;
@property (weak, nonatomic) IBOutlet UIButton *bigPicture3;
@property (weak, nonatomic) IBOutlet UILabel *littleTitle3;
- (IBAction)click;
- (IBAction)click2;
- (IBAction)click3;

@end
@implementation SHotPlayerTableViewCell

+ (instancetype)cellWithTabelView:(UITableView *)tableView{
    static NSString *ID = @"SHotPlayerTableViewCell";
    SHotPlayerTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"SHotPlayerTableViewCell" owner:nil options:nil] lastObject];
    }
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    return cell;
}

//模型传值
- (void)setModel:(ListCategoryModel *)model{
    _model = model;
    
    self.cardTitle.text = model.cardTitle;
    
    ListReourceModel *mod = model.ReourceArray[0];
    self.title.text = mod.title;
    self.littleTitle.text = mod.reProgramName;
    [self.bigPicture sd_setImageWithURL:[NSURL URLWithString:mod.img194_194] forState:UIControlStateNormal];
    
    ListReourceModel *mod2 = model.ReourceArray[1];
    self.title2.text = mod2.title;
    self.littleTitle2.text = mod2.reProgramName;
    [self.bigPicture2 sd_setImageWithURL:[NSURL URLWithString:mod2.img194_194] forState:UIControlStateNormal];
    
    ListReourceModel *mod3 = model.ReourceArray[2];
    self.title3.text = mod3.title;
    self.littleTitle3.text = mod3.reProgramName;
    [self.bigPicture3 sd_setImageWithURL:[NSURL URLWithString:mod3.img194_194] forState:UIControlStateNormal];
}
- (IBAction)click {
}

- (IBAction)click2 {
}

- (IBAction)click3 {
}
@end
